<?php

/**
 * Description of SearchForm
 *
 * @author Pavel Homolka
 */
use Nette\Application\UI\Form,
    Nette\ComponentModel\IContainer;

class SearchForm extends Form {

    public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $name = NULL) {
        parent::__construct($parent, $name);

        $this->addText('keyword', 'Vyhledat:')
                ->addRule(Form::FILLED)
                ->setDefaultValue('Prague');
        $this->addText('numberResult', 'Počet výsledků:')
                ->setDefaultValue(100);
        $this->addText('gps', 'GPS:')
                ->setDefaultValue('50.0897781; 14.3984339');
        $this->addText('radius', 'Okolí [km]')
                ->setDefaultValue(5)
                ->addRule(Form::FLOAT, 'Okolí musí být číslo!!!');

        $this->addSubmit('search', 'Hledat Flickrem');
    }

}

